.TH "IRC commands: sending messages/notices." 3 "10 Jan 2009" "Version 1.3" "libircclient" \" -*- nroff -*-
.ad l
.nh
.SH NAME
IRC commands: sending messages/notices. \- 
.SS "Functions"

.in +1c
.ti -1c
.RI "int \fBirc_cmd_msg\fP (\fBirc_session_t\fP *session, const char *nch, const char *text)"
.br
.RI "\fISends the message to the nick or to the channel. \fP"
.ti -1c
.RI "int \fBirc_cmd_me\fP (\fBirc_session_t\fP *session, const char *nch, const char *text)"
.br
.RI "\fISends the /me (CTCP ACTION) message to the nick or to the channel. \fP"
.ti -1c
.RI "int \fBirc_cmd_notice\fP (\fBirc_session_t\fP *session, const char *nch, const char *text)"
.br
.RI "\fISends the notice to the nick or to the channel. \fP"
.in -1c
.SH "Function Documentation"
.PP 
.SS "int irc_cmd_me (\fBirc_session_t\fP * session, const char * nch, const char * text)"
.PP
Sends the /me (CTCP ACTION) message to the nick or to the channel. 
.PP
\fBParameters:\fP
.RS 4
\fIsession\fP An initiated and connected session. 
.br
\fInch\fP A target nick or channel. Must not be NULL. 
.br
\fItext\fP Action message text. Must not be NULL.
.RE
.PP
\fBReturns:\fP
.RS 4
Return code 0 means success. Other value means error, the error code may be obtained through \fBirc_errno()\fP. Any error, generated by the IRC server, is available through \fBirc_callbacks_t::event_numeric\fP.
.RE
.PP
This function is used to send the /me message to channel or private. As for irc_cmd_msg, the target is determined by \fInch\fP argument.
.PP
Possible error responces for this command from the RFC1459:
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NORECIPIENT\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTEXTTOSEND\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_CANNOTSENDTOCHAN\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTONCHANNEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTOPLEVEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_WILDTOPLEVEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_TOOMANYTARGETS\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOSUCHNICK\fP
.PP
.PP
On success there is NOTHING generated. However, a \fBLIBIRC_RFC_RPL_AWAY\fP reply can be also generated.
.PP
\fBSee also:\fP
.RS 4
\fBirc_cmd_msg\fP 
.RE
.PP

.SS "irc_cmd_msg (\fBirc_session_t\fP * session, const char * nch, const char * text)"
.PP
Sends the message to the nick or to the channel. 
.PP
\fBParameters:\fP
.RS 4
\fIsession\fP An initiated and connected session. 
.br
\fInch\fP A target nick or channel. Must not be NULL. 
.br
\fItext\fP Message text. Must not be NULL.
.RE
.PP
\fBReturns:\fP
.RS 4
Return code 0 means success. Other value means error, the error code may be obtained through \fBirc_errno()\fP. Any error, generated by the IRC server, is available through \fBirc_callbacks_t::event_numeric\fP.
.RE
.PP
This function is used to send the channel or private messages. The target is determined by \fInch\fP argument: if it describes nick, this will be a private message, if a channel name - public (channel) message. Note that depending on channel modes, you may be required to join the channel to send the channel messages.
.PP
Possible error responces for this command from the RFC1459:
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NORECIPIENT\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTEXTTOSEND\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_CANNOTSENDTOCHAN\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTONCHANNEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTOPLEVEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_WILDTOPLEVEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_TOOMANYTARGETS\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOSUCHNICK\fP
.PP
.PP
On success there is NOTHING generated. 
.SS "int irc_cmd_notice (\fBirc_session_t\fP * session, const char * nch, const char * text)"
.PP
Sends the notice to the nick or to the channel. 
.PP
\fBParameters:\fP
.RS 4
\fIsession\fP An initiated and connected session. 
.br
\fInch\fP A target nick or channel. Must not be NULL. 
.br
\fItext\fP Notice text. Must not be NULL.
.RE
.PP
\fBReturns:\fP
.RS 4
Return code 0 means success. Other value means error, the error code may be obtained through \fBirc_errno()\fP. Any error, generated by the IRC server, is available through \fBirc_callbacks_t::event_numeric\fP.
.RE
.PP
This function is used to send the channel or private notices. The target is determined by \fInch\fP argument: if it describes nick, this will be a private message, if a channel name - public (channel) message. Note that depending on channel modes, you may be required to join the channel to send the channel notices.
.PP
The only difference between message and notice is that, according to RFC 1459, you must not automatically reply to NOTICE messages.
.PP
Possible error responces for this command from the RFC1459:
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NORECIPIENT\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTEXTTOSEND\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_CANNOTSENDTOCHAN\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTONCHANNEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTOPLEVEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_WILDTOPLEVEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_TOOMANYTARGETS\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOSUCHNICK\fP
.PP
.PP
On success there is NOTHING generated. On notices sent to target nick, a \fBLIBIRC_RFC_RPL_AWAY\fP reply may be generated.
.PP
\fBSee also:\fP
.RS 4
\fBirc_cmd_msg\fP 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for libircclient from the source code.
